<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>旅游游记</title>
    <link rel="stylesheet" type="text/css" href="/css/public.css" />
    <link rel="stylesheet" type="text/css" href="/css/PlayZhejiang.css" />
    <link rel="stylesheet" type="text/css" href="/css/NumberShow.css" />
    <link rel="stylesheet" type="text/css" href="/css/index.css" />
    <!-- 引入 layui.css -->
    <link href="//unpkg.com/layui@2.9.11/dist/css/layui.css" rel="stylesheet">
</head>

<body>
<div class="nav">
    <div class="container">
        <ul>
            <li><a th:href="@{/index}">首页</a></li>
            <li><a th:href="@{/travelNotes/getTravelNotesList}">旅游游记</a></li>
        </ul>
        <div style="float: right;margin-top: 13px;">
            <!-- 如果用户已登录，显示用户名 -->
            <span th:if="${session.currentUser != null}" style="margin-right: 10px;">欢迎，<span th:text="${session.currentUser.name}"></span></span>
            <!-- 如果用户未登录，显示登录按钮 -->
            <a th:if="${session.currentUser == null}" th:href="@{/user/toLogin}" class="layui-btn layui-btn-normal layui-btn-radius">登录</a>
            <!-- 如果用户已登录，显示发布旅游游记按钮 -->
            <a th:if="${session.currentUser != null}" th:href="@{/travelNotes/toAddPage}" class="layui-btn layui-btn-normal layui-btn-radius">发布旅游游记</a>
            <a th:if="${session.currentUser != null}" th:href="@{/user/logout}">退出登录</a>

        </div>
    </div>
</div>
<div class="banner" style="height: auto;">
    <img src="/img/banner-lygl-list.png">
    <h1></h1>
</div>

<div class="centerbox" style="width: 1660px;margin: 0 auto;">

    <ul class="propose" >
        <div class="titletype"><img src="/img/talent_recommend_title.png"></div>

        <li th:each="travelNotesList:${travelNotesList}">
            <a th:href="@{'/travelNotes/toDetailPage/'+${travelNotesList.travel_id}+'/'+${travelNotesList.user_id}}" th:id="${travelNotesList.travel_id}">
                <div class="bimg">
                    <img th:src="@{${travelNotesList.img}}">
                </div>
                <div class="text">
                    <h3 th:text="${travelNotesList.title}"></h3>
                    <p th:text="${travelNotesList.contend}"> </p>
                    <div>#玩小众#寻自然</div>
                </div>
            </a>
        </li>
    </ul>


</div>
</div>
<div class="footer">
    <div class="logo"><img src="/img/footer-logo.png"></div>
    <p>联系电话：0571-96118</p>
</div>
</body>
</html>